version: '4'

services:
 flask:
    deploy:
      replicas: 5
    build: .
    ports:
      - "5000"
    networks:
      - internal

 nginx:
    image: nginx:latest
    ports:
#      - "5000:80"
      - "5000:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./certs:/etc/nginx/certs
    depends_on:
      - flask
    networks:
      - internal
      - external

networks:
 internal:
 external:
